#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main() {
	FILE* fp = NULL;
	FILE* fp1 = fopen("data.txt", "r");
	if (fp1 != NULL) {
		fp = fopen("data_copy.txt", "w");
		int ch = 0;
		while ((ch = fgetc(fp1)) != EOF) {
			fputc(ch, fp);
		}
	}
	fclose(fp);
	fclose(fp1);
	return 0;
}